-
Notifications
You must be signed in to change notification settings - Fork 37
feat: save table filters in local storage #1143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces persistence of table filters using local storage and updates related test configurations to align with new import paths and helper functions.
- Added
useTableFilters
hook and updateduseColumnFilters
to use local storage - Updated test configs (Vite and TSConfig) with new path aliases and imports
- Refactored filter and table components (
RangeSliderFilter
,LlamaMarketsTable
) to use the new hooks
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
tests/vite.config.ts | Added resolve aliases for UI, kits, and APIs |
tests/tsconfig.json | Configured path mappings for package imports |
tests/cypress/tsconfig.json | Extended path mappings for Cypress tests |
tests/cypress/support/helpers/lending-mocks.ts | Updated API imports and utilization calculation in mocks |
tests/cypress/e2e/llamalend/llamalend-markets.cy.ts | Wrapped tests in a loop, refactored expandRowOnMobile helper, and updated selectors |
packages/tsconfig/cypress.json | Switched moduleResolution to bundler |
packages/curve-ui-kit/src/shared/ui/DataTable/TableFilters.tsx | Imported useTableFilters , removed unused useState , and changed useColumnFilters signature |
packages/curve-ui-kit/src/hooks/useLocalStorage.ts | Introduced useTableFilters hook |
apps/main/src/llamalend/PageLlamaMarkets/filters/RangeSliderFilter.tsx | Adjusted range filter logic and hook dependencies |
apps/main/src/llamalend/PageLlamaMarkets/LlamaMarketsTable.tsx | Added TITLE constant and updated useColumnFilters usage |
Comments suppressed due to low confidence (2)
packages/curve-ui-kit/src/shared/ui/DataTable/TableFilters.tsx:144
- [nitpick] The doc comment for
useColumnFilters
is outdated after changing the signature to accepttableTitle
. Update the comment to explain the purpose of thetableTitle
parameter and how filters are persisted.
*/
apps/main/src/llamalend/PageLlamaMarkets/filters/RangeSliderFilter.tsx:60
- [nitpick] Verify that
maxValue
matches the intended default maximum value (e.g.,defaultValue[1]
or adefaultMaximum
prop). Inconsistent naming betweendefaultValue
andmaxValue
can cause confusion or incorrect behavior.
: [newRange[0] === defaultMinimum ? null : newRange[0], newRange[1] === maxValue ? null : newRange[1]],
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right I didn't include this in the scope, I'll create a separate task |
Uh oh!
There was an error while loading. Please reload this page.